-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Docs: add path query example to data flow docs #20622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your help generating the output files @owen-mc 💖
The formatting here looks generally good. I've added a few comments about improving findability and on sentence case, but very little to say on the Docs side.
sink.asIndirectExpr(1) = fc.getArgument(0) and | ||
GetenvToGethostbynameFlow::flow(source, sink) | ||
select getenv, fc | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend adding a link to this example to line 318, after the description of Exercise 4, to make it easier for users to find this example.
I'd suggest a similar change to all articles that have exercise numbering like this - I think that's everything down to and including JavaScript/TypeScript.
GetenvToGethostbynameFlow::flow(source, sink) | ||
select getenv, fc | ||
Path Query Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use sentence case:
Path Query Example | |
Path query example |
Please update in all files
Path Query Example | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
Here is the first example above, converted into a path query: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to be more explicit here, maybe:
Here is the first example above, converted into a path query: | |
Here is the network input example above, converted into a path query: |
Alternatively, you could give the two queries above a heading.
Path Query Example | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
Here is the first example above, converted into a path query: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment on the Python description applies here and to the Ruby, Rust, and Swift examples.
--------------- | ||
|
||
- `Exploring data flow with path queries <https://docs.github.com/en/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/exploring-data-flow-with-path-queries>`__ in the GitHub documentation. | ||
- `Creating path queries <https://codeql.github.com/docs/writing-codeql-queries/creating-path-queries/>`__ in the GitHub documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've changed docs sites from GitHub to CodeQL, so we can simplify this:
- `Creating path queries <https://codeql.github.com/docs/writing-codeql-queries/creating-path-queries/>`__ in the GitHub documentation. | |
- `Creating path queries <https://codeql.github.com/docs/writing-codeql-queries/creating-path-queries/>`__. |
So far I have only done python. I will do the others soon.
Also fix some mistakes in the go data flow docs that I noticed while doing this.